#include "stdafx.h"
#include "Phone.h"


CPhone::CPhone()
{

}
CPhone::~CPhone()
{

}
void CPhone::setIMEI(const CString& sIMEI)
{
	m_sIMEI = sIMEI;
}
CString CPhone::getIMEI() const 
{
	return m_sIMEI;
}

void CPhone::setNote(const CString& sNote)
{
	m_sNote = sNote;
}
CString CPhone::getNote() const 
{
	return m_sNote;
}
void CPhone::setStatus(const int &bSell)
{
	m_bIsSell = bSell;
}
int CPhone::getStatus()const
{
	return m_bIsSell;
}

void CPhone::copy(const CProduct* pProdcut)
{
	CProduct::copy(pProdcut);
	if(typeid(*pProdcut) == typeid(CPhone))
	{
		CPhone* pPPhoneCopy = (CPhone*)pProdcut;
		m_sIMEI = pPPhoneCopy->getIMEI();

	}
}
CProduct* CPhone::clone()
{
	
	CPhone* pPhoneNew = new CPhone();

	pPhoneNew->copy(this);
	return pPhoneNew;
}

void CPhone::bought()
{

}
void CPhone::warranty()
{

}
bool CPhone::pushToDB()
{ 
	return true;
}
bool CPhone::updateDB()
{ 
	return true;
}
bool CPhone::removeOutDB()
{
	return true;
}


